package org.rcgwt.client.ui.validator.impl;

import org.rcgwt.client.ui.validator.IClientValidatorContext;
import org.rcgwt.client.ui.validator.ISingleton;
import org.rcgwt.client.ui.validator.ITranslator;
import org.rcgwt.client.ui.validator.IValidatorElement;

/**
 * Translates received character to its upper case form
 * 
 * @author Elian ORIOU
 * 
 */
public class UpperCaseTranslator implements ITranslator, ISingleton {

	private static final UpperCaseTranslator INSTANCE = new UpperCaseTranslator();

	protected UpperCaseTranslator() {

	}

	@Override
	public char translate(IClientValidatorContext context, char f) {
		return Character.toUpperCase(f);
	}

	public static IValidatorElement getInstance() {
		return INSTANCE;
	}
}
